3.7 \(\int \frac{1}{(a+b \csc ^2(c+d x))^3} \, dx\)

Optimal. Leaf size=144 \[ \frac{\sqrt{b} \left (15 a^2+20 a b+8 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{b} \cot (c+d x)}{\sqrt{a+b}}\right )}{8 a^3 d (a+b)^{5/2}}+\frac{b (7 a+4 b) \cot (c+d x)}{8 a^2 d (a+b)^2 \left (a+b \cot ^2(c+d x)+b\right )}+\frac{x}{a^3}+\frac{b \cot (c+d x)}{4 a d (a+b) \left (a+b \cot ^2(c+d x)+b\right )^2} \]

[Out]

x/a^3 + (Sqrt[b]*(15*a^2 + 20*a*b + 8*b^2)*ArcTan[(Sqrt[b]*Cot[c + d*x])/Sqrt[a + b]])/(8*a^3*(a + b)^(5/2)*d)
 + (b*Cot[c + d*x])/(4*a*(a + b)*d*(a + b + b*Cot[c + d*x]^2)^2) + (b*(7*a + 4*b)*Cot[c + d*x])/(8*a^2*(a + b)
^2*d*(a + b + b*Cot[c + d*x]^2))

________________________________________________________________________________________

Rubi [A]  time = 0.183872, antiderivative size = 144, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.429, Rules used = {4128, 414, 527, 522, 203, 205} \[ \frac{\sqrt{b} \left (15 a^2+20 a b+8 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{b} \cot (c+d x)}{\sqrt{a+b}}\right )}{8 a^3 d (a+b)^{5/2}}+\frac{b (7 a+4 b) \cot (c+d x)}{8 a^2 d (a+b)^2 \left (a+b \cot ^2(c+d x)+b\right )}+\frac{x}{a^3}+\frac{b \cot (c+d x)}{4 a d (a+b) \left (a+b \cot ^2(c+d x)+b\right )^2} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Csc[c + d*x]^2)^(-3),x]

[Out]

x/a^3 + (Sqrt[b]*(15*a^2 + 20*a*b + 8*b^2)*ArcTan[(Sqrt[b]*Cot[c + d*x])/Sqrt[a + b]])/(8*a^3*(a + b)^(5/2)*d)
 + (b*Cot[c + d*x])/(4*a*(a + b)*d*(a + b + b*Cot[c + d*x]^2)^2) + (b*(7*a + 4*b)*Cot[c + d*x])/(8*a^2*(a + b)
^2*d*(a + b + b*Cot[c + d*x]^2))

Rule 4128

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist
[ff/f, Subst[Int[(a + b + b*ff^2*x^2)^p/(1 + ff^2*x^2), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p},
 x] && NeQ[a + b, 0] && NeQ[p, -1]

Rule 414

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> -Simp[(b*x*(a + b*x^n)^(p + 1)*(
c + d*x^n)^(q + 1))/(a*n*(p + 1)*(b*c - a*d)), x] + Dist[1/(a*n*(p + 1)*(b*c - a*d)), Int[(a + b*x^n)^(p + 1)*
(c + d*x^n)^q*Simp[b*c + n*(p + 1)*(b*c - a*d) + d*b*(n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d,
 n, q}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] &&  !( !IntegerQ[p] && IntegerQ[q] && LtQ[q, -1]) && IntBinomial
Q[a, b, c, d, n, p, q, x]

Rule 527

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_.)*((e_) + (f_.)*(x_)^(n_)), x_Symbol] :> -Simp[
((b*e - a*f)*x*(a + b*x^n)^(p + 1)*(c + d*x^n)^(q + 1))/(a*n*(b*c - a*d)*(p + 1)), x] + Dist[1/(a*n*(b*c - a*d
)*(p + 1)), Int[(a + b*x^n)^(p + 1)*(c + d*x^n)^q*Simp[c*(b*e - a*f) + e*n*(b*c - a*d)*(p + 1) + d*(b*e - a*f)
*(n*(p + q + 2) + 1)*x^n, x], x], x] /; FreeQ[{a, b, c, d, e, f, n, q}, x] && LtQ[p, -1]

Rule 522

Int[((e_) + (f_.)*(x_)^(n_))/(((a_) + (b_.)*(x_)^(n_))*((c_) + (d_.)*(x_)^(n_))), x_Symbol] :> Dist[(b*e - a*f
)/(b*c - a*d), Int[1/(a + b*x^n), x], x] - Dist[(d*e - c*f)/(b*c - a*d), Int[1/(c + d*x^n), x], x] /; FreeQ[{a
, b, c, d, e, f, n}, x]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{1}{\left (a+b \csc ^2(c+d x)\right )^3} \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{1}{\left (1+x^2\right ) \left (a+b+b x^2\right )^3} \, dx,x,\cot (c+d x)\right )}{d}\\ &=\frac{b \cot (c+d x)}{4 a (a+b) d \left (a+b+b \cot ^2(c+d x)\right )^2}-\frac{\operatorname{Subst}\left (\int \frac{4 a+b-3 b x^2}{\left (1+x^2\right ) \left (a+b+b x^2\right )^2} \, dx,x,\cot (c+d x)\right )}{4 a (a+b) d}\\ &=\frac{b \cot (c+d x)}{4 a (a+b) d \left (a+b+b \cot ^2(c+d x)\right )^2}+\frac{b (7 a+4 b) \cot (c+d x)}{8 a^2 (a+b)^2 d \left (a+b+b \cot ^2(c+d x)\right )}-\frac{\operatorname{Subst}\left (\int \frac{8 a^2+9 a b+4 b^2-b (7 a+4 b) x^2}{\left (1+x^2\right ) \left (a+b+b x^2\right )} \, dx,x,\cot (c+d x)\right )}{8 a^2 (a+b)^2 d}\\ &=\frac{b \cot (c+d x)}{4 a (a+b) d \left (a+b+b \cot ^2(c+d x)\right )^2}+\frac{b (7 a+4 b) \cot (c+d x)}{8 a^2 (a+b)^2 d \left (a+b+b \cot ^2(c+d x)\right )}-\frac{\operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\cot (c+d x)\right )}{a^3 d}+\frac{\left (b \left (15 a^2+20 a b+8 b^2\right )\right ) \operatorname{Subst}\left (\int \frac{1}{a+b+b x^2} \, dx,x,\cot (c+d x)\right )}{8 a^3 (a+b)^2 d}\\ &=\frac{x}{a^3}+\frac{\sqrt{b} \left (15 a^2+20 a b+8 b^2\right ) \tan ^{-1}\left (\frac{\sqrt{b} \cot (c+d x)}{\sqrt{a+b}}\right )}{8 a^3 (a+b)^{5/2} d}+\frac{b \cot (c+d x)}{4 a (a+b) d \left (a+b+b \cot ^2(c+d x)\right )^2}+\frac{b (7 a+4 b) \cot (c+d x)}{8 a^2 (a+b)^2 d \left (a+b+b \cot ^2(c+d x)\right )}\\ \end{align*}

Mathematica [A]  time = 1.55985, size = 201, normalized size = 1.4 \[ \frac{\csc ^6(c+d x) (a \cos (2 (c+d x))-a-2 b) \left (\frac{\sqrt{b} \left (15 a^2+20 a b+8 b^2\right ) (a (-\cos (2 (c+d x)))+a+2 b)^2 \tan ^{-1}\left (\frac{\sqrt{a+b} \tan (c+d x)}{\sqrt{b}}\right )}{(a+b)^{5/2}}+\frac{4 a b^2 \sin (2 (c+d x))}{a+b}-8 (c+d x) (a (-\cos (2 (c+d x)))+a+2 b)^2+\frac{3 a b (3 a+2 b) \sin (2 (c+d x)) (a \cos (2 (c+d x))-a-2 b)}{(a+b)^2}\right )}{64 a^3 d \left (a+b \csc ^2(c+d x)\right )^3} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Csc[c + d*x]^2)^(-3),x]

[Out]

((-a - 2*b + a*Cos[2*(c + d*x)])*Csc[c + d*x]^6*(-8*(c + d*x)*(a + 2*b - a*Cos[2*(c + d*x)])^2 + (Sqrt[b]*(15*
a^2 + 20*a*b + 8*b^2)*ArcTan[(Sqrt[a + b]*Tan[c + d*x])/Sqrt[b]]*(a + 2*b - a*Cos[2*(c + d*x)])^2)/(a + b)^(5/
2) + (4*a*b^2*Sin[2*(c + d*x)])/(a + b) + (3*a*b*(3*a + 2*b)*(-a - 2*b + a*Cos[2*(c + d*x)])*Sin[2*(c + d*x)])
/(a + b)^2))/(64*a^3*d*(a + b*Csc[c + d*x]^2)^3)

________________________________________________________________________________________

Maple [B]  time = 0.089, size = 363, normalized size = 2.5 \begin{align*}{\frac{\arctan \left ( \tan \left ( dx+c \right ) \right ) }{d{a}^{3}}}+{\frac{9\,b \left ( \tan \left ( dx+c \right ) \right ) ^{3}}{8\,ad \left ( a \left ( \tan \left ( dx+c \right ) \right ) ^{2}+b \left ( \tan \left ( dx+c \right ) \right ) ^{2}+b \right ) ^{2} \left ( a+b \right ) }}+{\frac{{b}^{2} \left ( \tan \left ( dx+c \right ) \right ) ^{3}}{2\,d{a}^{2} \left ( a \left ( \tan \left ( dx+c \right ) \right ) ^{2}+b \left ( \tan \left ( dx+c \right ) \right ) ^{2}+b \right ) ^{2} \left ( a+b \right ) }}+{\frac{7\,{b}^{2}\tan \left ( dx+c \right ) }{8\,ad \left ( a \left ( \tan \left ( dx+c \right ) \right ) ^{2}+b \left ( \tan \left ( dx+c \right ) \right ) ^{2}+b \right ) ^{2} \left ({a}^{2}+2\,ab+{b}^{2} \right ) }}+{\frac{{b}^{3}\tan \left ( dx+c \right ) }{2\,d{a}^{2} \left ( a \left ( \tan \left ( dx+c \right ) \right ) ^{2}+b \left ( \tan \left ( dx+c \right ) \right ) ^{2}+b \right ) ^{2} \left ({a}^{2}+2\,ab+{b}^{2} \right ) }}-{\frac{15\,b}{8\,ad \left ({a}^{2}+2\,ab+{b}^{2} \right ) }\arctan \left ({ \left ( a+b \right ) \tan \left ( dx+c \right ){\frac{1}{\sqrt{ \left ( a+b \right ) b}}}} \right ){\frac{1}{\sqrt{ \left ( a+b \right ) b}}}}-{\frac{5\,{b}^{2}}{2\,d{a}^{2} \left ({a}^{2}+2\,ab+{b}^{2} \right ) }\arctan \left ({ \left ( a+b \right ) \tan \left ( dx+c \right ){\frac{1}{\sqrt{ \left ( a+b \right ) b}}}} \right ){\frac{1}{\sqrt{ \left ( a+b \right ) b}}}}-{\frac{{b}^{3}}{d{a}^{3} \left ({a}^{2}+2\,ab+{b}^{2} \right ) }\arctan \left ({ \left ( a+b \right ) \tan \left ( dx+c \right ){\frac{1}{\sqrt{ \left ( a+b \right ) b}}}} \right ){\frac{1}{\sqrt{ \left ( a+b \right ) b}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a+b*csc(d*x+c)^2)^3,x)

[Out]

1/d/a^3*arctan(tan(d*x+c))+9/8/d/a*b/(a*tan(d*x+c)^2+b*tan(d*x+c)^2+b)^2/(a+b)*tan(d*x+c)^3+1/2/d/a^2*b^2/(a*t
an(d*x+c)^2+b*tan(d*x+c)^2+b)^2/(a+b)*tan(d*x+c)^3+7/8/d/a*b^2/(a*tan(d*x+c)^2+b*tan(d*x+c)^2+b)^2/(a^2+2*a*b+
b^2)*tan(d*x+c)+1/2/d/a^2*b^3/(a*tan(d*x+c)^2+b*tan(d*x+c)^2+b)^2/(a^2+2*a*b+b^2)*tan(d*x+c)-15/8/d/a*b/(a^2+2
*a*b+b^2)/((a+b)*b)^(1/2)*arctan((a+b)*tan(d*x+c)/((a+b)*b)^(1/2))-5/2/d/a^2*b^2/(a^2+2*a*b+b^2)/((a+b)*b)^(1/
2)*arctan((a+b)*tan(d*x+c)/((a+b)*b)^(1/2))-1/d/a^3*b^3/(a^2+2*a*b+b^2)/((a+b)*b)^(1/2)*arctan((a+b)*tan(d*x+c
)/((a+b)*b)^(1/2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*csc(d*x+c)^2)^3,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 0.681447, size = 2175, normalized size = 15.1 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*csc(d*x+c)^2)^3,x, algorithm="fricas")

[Out]

[1/32*(32*(a^4 + 2*a^3*b + a^2*b^2)*d*x*cos(d*x + c)^4 - 64*(a^4 + 3*a^3*b + 3*a^2*b^2 + a*b^3)*d*x*cos(d*x +
c)^2 + 32*(a^4 + 4*a^3*b + 6*a^2*b^2 + 4*a*b^3 + b^4)*d*x + ((15*a^4 + 20*a^3*b + 8*a^2*b^2)*cos(d*x + c)^4 +
15*a^4 + 50*a^3*b + 63*a^2*b^2 + 36*a*b^3 + 8*b^4 - 2*(15*a^4 + 35*a^3*b + 28*a^2*b^2 + 8*a*b^3)*cos(d*x + c)^
2)*sqrt(-b/(a + b))*log(((a^2 + 8*a*b + 8*b^2)*cos(d*x + c)^4 - 2*(a^2 + 5*a*b + 4*b^2)*cos(d*x + c)^2 + 4*((a
^2 + 3*a*b + 2*b^2)*cos(d*x + c)^3 - (a^2 + 2*a*b + b^2)*cos(d*x + c))*sqrt(-b/(a + b))*sin(d*x + c) + a^2 + 2
*a*b + b^2)/(a^2*cos(d*x + c)^4 - 2*(a^2 + a*b)*cos(d*x + c)^2 + a^2 + 2*a*b + b^2)) - 4*(3*(3*a^3*b + 2*a^2*b
^2)*cos(d*x + c)^3 - (9*a^3*b + 13*a^2*b^2 + 4*a*b^3)*cos(d*x + c))*sin(d*x + c))/((a^7 + 2*a^6*b + a^5*b^2)*d
*cos(d*x + c)^4 - 2*(a^7 + 3*a^6*b + 3*a^5*b^2 + a^4*b^3)*d*cos(d*x + c)^2 + (a^7 + 4*a^6*b + 6*a^5*b^2 + 4*a^
4*b^3 + a^3*b^4)*d), 1/16*(16*(a^4 + 2*a^3*b + a^2*b^2)*d*x*cos(d*x + c)^4 - 32*(a^4 + 3*a^3*b + 3*a^2*b^2 + a
*b^3)*d*x*cos(d*x + c)^2 + 16*(a^4 + 4*a^3*b + 6*a^2*b^2 + 4*a*b^3 + b^4)*d*x + ((15*a^4 + 20*a^3*b + 8*a^2*b^
2)*cos(d*x + c)^4 + 15*a^4 + 50*a^3*b + 63*a^2*b^2 + 36*a*b^3 + 8*b^4 - 2*(15*a^4 + 35*a^3*b + 28*a^2*b^2 + 8*
a*b^3)*cos(d*x + c)^2)*sqrt(b/(a + b))*arctan(1/2*((a + 2*b)*cos(d*x + c)^2 - a - b)*sqrt(b/(a + b))/(b*cos(d*
x + c)*sin(d*x + c))) - 2*(3*(3*a^3*b + 2*a^2*b^2)*cos(d*x + c)^3 - (9*a^3*b + 13*a^2*b^2 + 4*a*b^3)*cos(d*x +
 c))*sin(d*x + c))/((a^7 + 2*a^6*b + a^5*b^2)*d*cos(d*x + c)^4 - 2*(a^7 + 3*a^6*b + 3*a^5*b^2 + a^4*b^3)*d*cos
(d*x + c)^2 + (a^7 + 4*a^6*b + 6*a^5*b^2 + 4*a^4*b^3 + a^3*b^4)*d)]

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\left (a + b \csc ^{2}{\left (c + d x \right )}\right )^{3}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*csc(d*x+c)**2)**3,x)

[Out]

Integral((a + b*csc(c + d*x)**2)**(-3), x)

________________________________________________________________________________________

Giac [A]  time = 1.50943, size = 302, normalized size = 2.1 \begin{align*} -\frac{\frac{{\left (15 \, a^{2} b + 20 \, a b^{2} + 8 \, b^{3}\right )}{\left (\pi \left \lfloor \frac{d x + c}{\pi } + \frac{1}{2} \right \rfloor \mathrm{sgn}\left (2 \, a + 2 \, b\right ) + \arctan \left (\frac{a \tan \left (d x + c\right ) + b \tan \left (d x + c\right )}{\sqrt{a b + b^{2}}}\right )\right )}}{{\left (a^{5} + 2 \, a^{4} b + a^{3} b^{2}\right )} \sqrt{a b + b^{2}}} - \frac{9 \, a^{2} b \tan \left (d x + c\right )^{3} + 13 \, a b^{2} \tan \left (d x + c\right )^{3} + 4 \, b^{3} \tan \left (d x + c\right )^{3} + 7 \, a b^{2} \tan \left (d x + c\right ) + 4 \, b^{3} \tan \left (d x + c\right )}{{\left (a^{4} + 2 \, a^{3} b + a^{2} b^{2}\right )}{\left (a \tan \left (d x + c\right )^{2} + b \tan \left (d x + c\right )^{2} + b\right )}^{2}} - \frac{8 \,{\left (d x + c\right )}}{a^{3}}}{8 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*csc(d*x+c)^2)^3,x, algorithm="giac")

[Out]

-1/8*((15*a^2*b + 20*a*b^2 + 8*b^3)*(pi*floor((d*x + c)/pi + 1/2)*sgn(2*a + 2*b) + arctan((a*tan(d*x + c) + b*
tan(d*x + c))/sqrt(a*b + b^2)))/((a^5 + 2*a^4*b + a^3*b^2)*sqrt(a*b + b^2)) - (9*a^2*b*tan(d*x + c)^3 + 13*a*b
^2*tan(d*x + c)^3 + 4*b^3*tan(d*x + c)^3 + 7*a*b^2*tan(d*x + c) + 4*b^3*tan(d*x + c))/((a^4 + 2*a^3*b + a^2*b^
2)*(a*tan(d*x + c)^2 + b*tan(d*x + c)^2 + b)^2) - 8*(d*x + c)/a^3)/d